function renderCurrentUser(currentUser) {
  var oWho = document.querySelector('.who')
  if (currentUser) {
    oWho.textContent = `${currentUser.username}, 欢迎使用音乐创作中心`
  } else {
    oWho.textContent = "亲爱的创意家们,创作中心需登陆后才能使用哦~"
    oWho.textContent+="点击下方登录按钮,开启创作之旅吧..."
  }
}
window.onload=function () {
  var xhr = new XMLHttpRequest()
  xhr.open('get', '/studio/user/currentUser.json')
  xhr.onload= function () {
    console.log(this.responseText)

    var data = JSON.parse(this.responseText)

        renderCurrentUser(data)
  }
  xhr.send()
}